<?php
/**
 *
 * CBC 타입 암호화
 *
 */

class utilDesCbc extends utilDesAbstract
{
    public function __construct($encrypt_key)
    {
        $this->encrypt_key = $encrypt_key;
        $this->encrypt_type = MCRYPT_RIJNDAEL_128;
        $this->encrypt_mode = MCRYPT_MODE_CBC;
    }

    public static function getInstance($encrypt_key)
    {
        self::$call_class = __CLASS__;

        return parent::getInstance($encrypt_key);
    }

    public function decrypt($sString)
    {
        if (empty($sString) === true) return false;

        return base64_decode($sString);
    }

    public function encrypt($sString)
    {
        if (empty($sString)) return false;

        return base64_encode($sString);
    }
}
